package com.crecheng.shop.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.crecheng.shop.DAO.ItemKindData;
import com.crecheng.shop.util.ConSQL;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {
    @RequestMapping("/showData")
    public @ResponseBody
    String getData(){
        var obj=ConSQL.select(ItemKindData.class);
        return JSONArray.toJSONString(obj);
    }
}
